package llin.example.jpa.controller;

import llin.example.jpa.dao.repository.SysUserRepository;
import llin.example.jpa.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Larry
 * 2021/10/13 18:59
 *
 * @Version 1.0
 */
@Slf4j
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    private UserService userService;

    @ResponseBody
    @RequestMapping(value = "/findAll")
    Object findAll(HttpServletRequest request, HttpServletResponse response) {
        return userService.select();
    }


}
